Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ivy): use hex flags instead of binary for TNodeFlags #33605

Closed
wants to merge 2 commits into from

Conversation

matsko
Copy link
Contributor

@matsko matsko commented Nov 5, 2019

No description provided.

@matsko matsko added target: patch This PR is targeted for the next patch release comp: ivy labels Nov 5, 2019
@matsko matsko requested a review from a team as a code owner November 5, 2019 22:18
@ngbot ngbot bot added this to the needsTriage milestone Nov 5, 2019
Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matsko matsko added the action: merge The PR is ready for merge by the caretaker label Nov 5, 2019
@matsko
Copy link
Contributor Author

matsko commented Nov 5, 2019

Copy link
Contributor

@mhevery mhevery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this better than binary?

@matsko
Copy link
Contributor Author

matsko commented Nov 5, 2019

@mhevery the next PR adds in 10+ more flags. So managing the binary notation is tricky and cumbersome. It's hard to track where each bit is.

Given that most flags are independent bits, it makes more sense to just use increment of hex values since there are only 4 to memorize: 0x1, 0x2, 0x4 and 0x8. If and when flags are combined then we can do so using the enum labels (e.g. hasTemplateAndHostBindings = hasTemplateBindings | hasHostBindings).

@atscott atscott closed this in 5453c4c Nov 6, 2019
mohaxspb pushed a commit to mohaxspb/angular that referenced this pull request Nov 7, 2019
mohaxspb pushed a commit to mohaxspb/angular that referenced this pull request Nov 7, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants